Repository navigation
Conversation
- UpdateVersionTask now rewrites only the `version=` line in
gradle.properties instead of using Properties.store(), which reordered
keys (in a JDK-dependent order) and added a timestamp comment.
- copyLicenses now sorts the entries in third_party/LICENSES.{xml,html,json}
by dependency name. The license-report plugin emits them in a
nondeterministic order, which reshuffled ~80-130 lines on every release
even when no dependency changed.
- Removes the stale timestamp comment from gradle.properties and commits the
sorted license reports so the next release prep starts from a clean
baseline.
Verified by running `./gradlew prepareRelease -PnewVersion=48.1.2` twice:
the second run produces no diff, and updateVersion/updateVersionToNextSnapshot
change only the version line.
Change-Id: Idf80af67546f99ab4d7b5ffbe5629b11438a02d3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes the output of
./gradlew prepareRelease(andupdateVersionToNextSnapshot) deterministic so release PRs only show real changes.Problem: Every release prep PR / snapshot bump had ~80-140 lines of pure reordering noise:
UpdateVersionTaskusedProperties.store(), which reordersgradle.propertieskeys (JDK-dependent order) and adds a timestamp comment.third_party/LICENSES.{xml,html,json}in a nondeterministic order (e.g. 82 lines for 48.1.0, 118 for 47.0.0, all reorder-only).Changes:
UpdateVersionTaskrewrites only theversion=line.copyLicensessorts each license report by dependency name (XML/HTML by text block, formatting preserved; JSON byname). Fails loudly if the report format is unexpected.gradle.properties.LICENSES.*(one-time reorder, no content change: same 55 entries, same lines/bytes) so the next release starts clean.Testing:
./gradlew prepareRelease -PnewVersion=48.1.2run twice: second run produces no diff;gradle.propertiesonly changes theversion=line.updateVersionToNextSnapshot:48.1.2->48.1.3-SNAPSHOT,48.1.1-rc1->48.1.1-SNAPSHOT, version line only.verifyLicensespasses.